/**
 * @see 该界面是“学生界面”的子组件
 */
Component({
  options: {
    addGlobalClass: true
  },
  properties: {
    courseData: {
      type: Array,
      value: []
    },
    bIsAuthorize: {
      type: Boolean,
      value: false
    },
    refreshing: {
      type: Boolean,
      value: false
    }
  },
  data: {
    upperDay: ['', '一', '二', '三', '四', '五', '六', '日']
  },
  methods: {
    refreshData () {
      this.triggerEvent('refreshData')
    },
    /**
    * @see 点击“签到”按钮
    */
    bindStuAttend (e) {
      this.triggerEvent('stuAttend', e.currentTarget.dataset)
    },
    /**
    * @see 点击“开启考勤”按钮
    */
    bindOpenAttendance (e) {
      this.triggerEvent('openAttendance', e.currentTarget.dataset)
    }
  }
})